home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
H-I
/
HintTemplate.cpt
/
Hint Template
/
background_2640.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
10KB
|
434 lines
-- background: 2640 from stack: in
-- bmap block id: 2492
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on closeCard
Hide Bkgnd Field "Hint 1"
Hide Bkgnd Field "Hint 2"
Hide Bkgnd Field "Hint 3"
Hide Bkgnd Field "Hint 4"
Put Bkgnd Field "Is Open" into it
If it then send mouseUp to Bkgnd Button "Close Hints"
end closeCard
on openCard
Put Bkgnd Field "Last Shown" into theLast
if theLast is empty then put 0 into theLast
Repeat with it = 1 to theLast
put "Hint " & it into theField
show Bkgnd Field theField
end Repeat
end openCard
-- part 1 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=10 top=321 right=340 bottom=69
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Import
----- HyperTalk script -----
on mouseUp
Push Card
Put FileName("TEXT") into theFile
if theFile is not empty then
go to last card
open file theFile
read from file theFile until return
repeat while it is not empty
if word 1 to 3 of it <> "** Card **" then
read from file theFile until return
next repeat
else
read from file theFile until return
end if
DoMenu New Card
Delete Char Offset(Return,it) of it
Put it into Bkgnd Field "Problem Description"
Hide Bkgnd Field "Hint 1"
Hide Bkgnd Field "Hint 2"
Hide Bkgnd Field "Hint 3"
Hide Bkgnd Field "Hint 4"
put empty into Bkgnd Field "Hint 1"
put empty into Bkgnd Field "Hint 2"
put empty into Bkgnd Field "Hint 3"
put empty into Bkgnd Field "Hint 4"
Put 0 into Bkgnd Field "Last Shown"
Put false into Bkgnd Field "Is Open"
read from file theFile until return
if word 1 to 3 of it = "** Card **" then
next repeat
end if
Delete Char Offset(Return,it) of it
if it = "" then put empty into Bkgnd Field "Hint 1"
else Put it into Bkgnd Field "Hint 1"
read from file theFile until return
if word 1 to 3 of it = "** Card **" then
next repeat
end if
Delete Char Offset(Return,it) of it
if it = "" then put empty into Bkgnd Field "Hint 2"
else Put it into Bkgnd Field "Hint 2"
read from file theFile until return
if word 1 to 3 of it = "** Card **" then
next repeat
end if
Delete Char Offset(Return,it) of it
if it = "" then put empty into Bkgnd Field "Hint 3"
else Put it into Bkgnd Field "Hint 3"
read from file theFile until return
if word 1 to 3 of it = "** Card **" then
next repeat
end if
Delete Char Offset(Return,it) of it
if it = "" then put empty into Bkgnd Field "Hint 4"
else Put it into Bkgnd Field "Hint 4"
read from file theFile until return
end repeat
close file theFile
end if
Pop Card
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=218 top=321 right=338 bottom=279
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Find
----- HyperTalk script -----
on mouseUp
global FindText
Ask "What do you wish a hint on?" with FindText
go to next card of this background
Find Chars it in field "Problem Description"
if the Result = "not found" then
answer "No hints were found for" && it with "OK"
end if
put it into FindText
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=184 top=319 right=340 bottom=208
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Previous
----- HyperTalk script -----
on mouseUp
go to previous card of this background
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=286 top=319 right=340 bottom=310
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
go to next card of this background
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=445 top=321 right=340 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New
----- HyperTalk script -----
on mouseUp
Push Card
Go to last card
DoMenu New Card
Hide Bkgnd Field "Hint 1"
Hide Bkgnd Field "Hint 2"
Hide Bkgnd Field "Hint 3"
Hide Bkgnd Field "Hint 4"
Ask "Enter Problem Description:"
Put it into Bkgnd Field "Problem Description"
Ask "Enter First Hint:"
Put it into Bkgnd Field "Hint 1"
Ask "Enter Second Hint:"
Put it into Bkgnd Field "Hint 2"
Ask "Enter Third Hint:"
Put it into Bkgnd Field "Hint 3"
Ask "Enter Fourth Hint:"
Put it into Bkgnd Field "Hint 4"
Put 0 into Bkgnd Field "Last Shown"
Put false into Bkgnd Field "Is Open"
Pop Card
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=212 top=296 right=316 bottom=284
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Take Hint
----- HyperTalk script -----
on mouseUp
Put Bkgnd Field "Last Shown" into it
If it < 4 then
add 1 to it
put "Hint " & it into theField
If Bkgnd Field theField is not empty then
put it into Bkgnd Field "Last Shown"
show Bkgnd Field theField
else
answer "There are no more hints on this card" with "OK"
end if
else
answer "There are no more hints on this card" with "OK"
end if
end mouseUp
-- part 8 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=1 top=38 right=73 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Problem Description
-- part 9 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=1 top=93 right=128 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hint 1
-- part 10 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=1 top=148 right=183 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hint 2
-- part 11 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=1 top=203 right=238 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hint 3
-- part 12 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=1 top=258 right=293 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hint 4
-- part 13 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=14 top=25 right=41 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Last Shown
-- part 18 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=124 top=296 right=316 bottom=205
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Reset Hints
----- HyperTalk script -----
on mouseUp
Hide Bkgnd Field "Hint 1"
Hide Bkgnd Field "Hint 2"
Hide Bkgnd Field "Hint 3"
Hide Bkgnd Field "Hint 4"
Put 0 into Bkgnd Field "Last Shown"
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=291 top=296 right=316 bottom=370
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Open Hints
----- HyperTalk script -----
on mouseUp
put Bkgnd Field "Is Open" into it
if not it then
set name of bkgnd button "Open Hints" to "Close Hints"
put true into Bkgnd Field "Is Open"
set lockText of Bkgnd Field "Problem Description" to false
set lockText of Bkgnd Field "Hint 1" to false
set lockText of Bkgnd Field "Hint 2" to false
set lockText of Bkgnd Field "Hint 3" to false
set lockText of Bkgnd Field "Hint 4" to false
Show Bkgnd Field "Hint 1"
Show Bkgnd Field "Hint 2"
Show Bkgnd Field "Hint 3"
Show Bkgnd Field "Hint 4"
else
set name of bkgnd button "Close Hints" to "Open Hints"
put false into Bkgnd Field "Is Open"
set lockText of Bkgnd Field "Problem Description" to true
set lockText of Bkgnd Field "Hint 1" to true
set lockText of Bkgnd Field "Hint 2" to true
set lockText of Bkgnd Field "Hint 3" to true
set lockText of Bkgnd Field "Hint 4" to true
Hide Bkgnd Field "Hint 1"
Hide Bkgnd Field "Hint 2"
Hide Bkgnd Field "Hint 3"
Hide Bkgnd Field "Hint 4"
Put 0 into Bkgnd Field "Last Shown"
end if
end mouseUp
-- part 20 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=119 top=26 right=39 bottom=159
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Is Open